#include <stdio.h>

int main() {
    int N;
    scanf("%d", &N);
    
    int a = 0;
    
    for (int m = 0; m <= N; m++) {
        if ((N - 5 * m) % 3 != 0 || (N - 5 * m) < 0) {
            continue; 
        }
        int w = (N - 5 * m) / 3;
        int c = N - m - w; 
        
        if (c >= 0 && c % 2 == 0) {
            printf("men=%d women=%d child=%d\n", m, w, c);
            a = 1;
        }
    }
    
    if (!a) {
        printf("No solution!");
    }
    
    return 0;
}
